﻿@model HdipCricketClub.Models.Fixture

@{
    ViewBag.Title = "Edit Fixture";
}

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Fixture</legend>

        @Html.HiddenFor(model => model.fixture_id)

        <div class="editor-label">
            @Html.LabelFor(model => model.team_id, "Team:")
        </div>
        <div class="editor-field">
            @Html.DropDownList("team_id", String.Empty)
            @Html.ValidationMessageFor(model => model.team_id)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.opponent_id, "Opponent:")
        </div>
        <div class="editor-field">
            @Html.DropDownList("opponent_id", String.Empty)
            @Html.ValidationMessageFor(model => model.opponent_id)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.type)
            @Html.ValidationMessageFor(model => model.type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.home)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.home)
            @Html.ValidationMessageFor(model => model.home)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.date)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.date)
            @Html.ValidationMessageFor(model => model.date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.start_time)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.start_time)
            @Html.ValidationMessageFor(model => model.start_time)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.no_of_players)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.no_of_players)
            @Html.ValidationMessageFor(model => model.no_of_players)
        </div>
               
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
